home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vsms111.zip / MAIL.BAT < prev    next >
DOS Batch File  |  1992-12-06  |  2KB  |  61 lines

  1. @ECHO OFF
  2. echo.
  3. ECHO Mail System v1.11 MX-Multiuser DOS. By Chris Cappuccio.
  4. echo.
  5. IF %dostype%.==. GOTO fakeuser
  6. :mailsys
  7. IF %1.==console. GOTO MAILIT
  8. IF %1.==remote. goto mailit
  9. IF %1.==. GOTO gmail
  10. ECHO Sorry, user %1 unknown.
  11. ECHO Valid users are: console, remote (you must use lowercase!)
  12. ECHO.
  13. goto end
  14. :MAILIT
  15. ECHO Sending mail to %1 from %user%
  16. ECHO *Mail to %1 from %user% >>\MXDOS\MAIL\%1.box
  17. showtime>>\mxdos\mail\%1.box
  18. echo.>>\mxdos\mail\%1.box
  19. ECHO To enter message, type I to start, Control-Z and E when done.
  20. ECHO To abort message, type Control-Z and Q.
  21. echo.
  22. echo Note: After you type Control-Z, I, E, or Q, press [RETURN]
  23. echo.
  24. EDLIN \MXDOS\MAIL\%1.TMP
  25. IF NOT EXIST \MXDOS\MAIL\%1.TMP GOTO aborted
  26. TYPE \MXDOS\MAIL\%1.TMP>>\MXDOS\MAIL\%1.BOX
  27. DEL \MXDOS\MAIL\%1.TMP
  28. ECHO.>>\MXDOS\MAIL\%1.BOX
  29. echo Mail sent to %1.
  30. echo.
  31. echo Mail sent from %user% to %1 at>>\MXDOS\LOGS\MAIL.LOG
  32. SHOWTIME>>\MXDOS\LOGS\MAIL.LOG
  33. echo.>>\mxdos\logs\mail.log
  34. goto end
  35. :gmail
  36. if not exist \MXDOS\MAIL\%USER%.BOX GOTO nomail
  37. more <\mxdos\mail\%user%.box
  38. ECHO Do you want to delete your mail?
  39. YESNO
  40. IF ERRORLEVEL 1 DEL \MXDOS\MAIL\%USER%.BOX
  41. echo.
  42. goto end
  43. :nomail
  44. ECHO You have no mail.
  45. ECHO.
  46. goto end
  47. :aborted
  48. echo.
  49. ECHO Mail Aborted
  50. ECHO.
  51. ECHO *Mail Aborted By Sender>>\MXDOS\MAIL\%1.BOX
  52. ECHO.>>\MXDOS\MAIL\%1.BOX
  53. goto end
  54. :fakeuser
  55. ECHO You are not runnning under MX-Multiuser DOS. Your username
  56. ECHO is now set to console.
  57. ECHO.
  58. SET USER=console
  59. goto mailsys
  60. :end
  61.